#ifndef MENU_H
#define MENU_H

#include "menu_list.h"

#define MENU_NUMBER_OF_ITEMS 8

// (-1) == "cd .."
// (>=0) == item index
typedef void (*menu_callback_t) (int);
#define MENU_BACK -1

// Initializes menu data.
// Only needs to be called once.
inline void menu_init (void);

// Configures item selection callback.
inline void menu_configure_callback (menu_callback_t);

// Updates menu items.
void menu_configure_items (menu_list_p);

// Draws the menu.
// Should only be called after all configurations are done.
void menu_draw (void*);

// Stops selection events.
// After this call, the items configuration is lost.
inline void menu_exit (void);

#endif /* MENU_H */
